<template>
  <div class="header_box">
    <div class="m-header" v-if="goBack">
      <div class="left" @click="$router.go(-1)">
        <img src="../assets/images/ic_bar_back_white.png" alt="">
      </div>
      <div class="modileTitle" v-show="modileTitle">
        <span>{{modileTitle}}</span>
      </div>
      <div class="right">&nbsp;</div>
    </div>
    <div class="m-header2" v-if="noBack">
      <div class="modileText" v-show="modileTitle">
        <span>{{modileTitle}}</span>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    props: [
      'goBack',
      'modileTitle',
      'noBack'
    ]
  }

</script>
<style lang="less">
  /*导入颜色变量*/
  @import "../assets/less/var.less";

  .header_box {
    position: fixed;
    width: 100%;
    z-index: 333;
    top: 0;
    left: 0;
    .m-header {
      display: flex;
      align-items: center;
      height: 60px;
      background: #d86161;
      position: relative;
      justify-content: space-between;
      .left {
        /*width: 20%;*/
        height: 60px;
        background: #d86161;
        img {
          width: 40px;
          height: 40px;
          margin-top: 10px;
          /*margin-left: -76px;*/
        }
      }
      .modileTitle {
        /*width: 60%;*/
        height: 60px;
        text-align: center;
        span {
          font-size: 24px;
          color: #fff;
          line-height: 60px;
        }
      }
      .right{
        /*width: 20%;*/
        height: 60px;
      }

    }
    .m-header2{
      /*text-align: center;*/
      height: 60px;
      background: #d86161;
      position: relative;
      display: inline-flex;
      align-items: center;
      width: 100%;
      justify-content: center;
      .modileText{
        font-size: 24px;
        color: #ffffff;
      }
    }
  }

</style>
